//
//  UIBarButtenItem+Extensions.swift
//  CLWeiNo
//
//  Created by DDC on 2017/10/10.
//  Copyright © 2017年 DDC. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    
    /// 重写UIBarButtonItem构造函数
    ///
    /// - Parameters:
    ///   - title: 标题
    ///   - fontsize: 字体大小
    ///   - action: 事件
    ///   - target: 执行者
    convenience init(title:String,fontsize:CGFloat,action:Selector,target:Any?) {
        
        let btn = UIButton.hm_button(withTitle: title, fontSize: fontsize, textColor: UIColor.gray, higlightTextColor: UIColor.orange)
        btn.addTarget(target, action: action, for: .touchUpInside)
        
        
        self.init(customView: btn)
        
    }
    
}
